<template>
	<view class="footer">
		<view class="nav">
			<view class="navItem" @click="toHome">
				<image src="https://img.js.design/assets/img/664e35f997fdce414c2ce95e.png#c0319aa0dd57cc25215682bbeb6a45ea" mode=""></image>
				<text>首页</text>
			</view>
			<view class="navItem">
				<image src="https://img.js.design/assets/img/658598fa4d644979c8241211.png#00554c4a3178c529e95d3017bfd2ff40" mode=""></image>
				<text>客服</text>
			</view>
		</view>
		<view class="but" @click="openPopup">
			<text>立即购买</text>
		</view>
	</view>
	<uni-popup ref="typePopup" type="bottom" background-color="#fff" borderRadius="20rpx 20rpx 0 0" animation="true">
		<view class="popup-content">
			<view class="top-shop-card">
				<image src="https://img.js.design/assets/img/66f3b4fc4f6056eb854947ba.jpg#79a4e3c337605d1e330ce141cb3b7018" mode="aspectFill"></image>
				<view class="Price-Specification">
					<view class="Price">
						<text>￥178-1733</text>
					</view>
					<view class="Specification">
						<text>剩余 1552 件</text>
						<text>请选择 规格</text>
					</view>
				</view>
			</view>
			<view class=""></view>
			<view class="confirm" @click="toEquipOrders">下一步</view>
		</view>
	</uni-popup>
</template>

<script setup>
	import { ref } from 'vue';
	const typePopup = ref(null);
	const props = defineProps({
		  equipData: {
				type: Array,
				default: () => []
		  }
	});
	const toHome = () =>{
		uni.switchTab({
			url:'/pages/home/index'
		})
	}
	const openPopup = () => {
		typePopup.value.open('bottom');
	};
	const toEquipOrders = () =>{
		uni.navigateTo({
			url:'/homeSubpages/EquipOrders/EquipOrders'
		})
	}
</script>

<style lang="scss" scoped>
	.footer {
		width: 100%;
		height: 130rpx;
		background-color: #fff;
		position: -webkit-sticky;
		position: sticky;
		bottom: 0rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 20rpx 40rpx;
		padding-bottom: 30rpx;
		box-sizing: border-box;
		.nav{
			display: flex;
			gap: 60rpx;
			justify-content: center;
			align-items: center;
			.navItem {
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: space-around;
				
				image {
					width: 40rpx;
					height: 36rpx;
				}
				
				text {
					font-size: 28rpx;
					color: #717171;
				}
			}
				
		}
		.but {
			display: flex;
			align-items: center;
			width: 400rpx;
			height: 100%;
			border-radius: 50rpx;
			background-color: #000;
			overflow: hidden;
			text {
				width: 100%;
				text-align: center;
				color: #fff;
			}
		}
	}
	.popup-content{
		width: 100%;
		min-height: 700rpx;
		border-radius: 30rpx;
		background-color: #fff;
		padding: 30rpx;
		box-sizing: border-box;
		.top-shop-card{
			width: 100%;
			height: 200rpx;
			display: flex;
			align-items: center;
			gap: 30rpx;
			image{
				min-width: 200rpx;
				max-width: 200rpx;
				height: 200rpx;
				border-radius: 10rpx;
			}
			.Price-Specification{
				width: 100%;
				height: 95%;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
			}
			.Price{
				font-size: 34rpx;
				font-weight: 400;
			}
			.Specification{
				display: flex;
				flex-direction: column;
				gap: 10rpx;
				text{
					color: rgba(128, 128, 128, 1);
					font-size: 32rpx;
					font-weight: 400;
				}
			}
		}
		.confirm{
			width: 90%;
			height: 80rpx;
			display: flex;
			justify-content: center;
			font-size: 28rpx;
			align-items: center;
			background-color: #000;
			border-radius: 100rpx;
			color: #fff;
			position: absolute;
			bottom: 0rpx;
			left: 50%;
			transform: translate(-50%,0);
		}
	}	
</style>